//
//  HotPresenterCell.m
//  Everest
//
//  Created by 李其昌 on 14/12/23.
//  Copyright (c) 2014年 ThreeL. All rights reserved.
//

#import "HotPresenterCell.h"

@implementation HotPresenterCell

- (void)dealloc
{
    [_myImageView release];
    [_nickLabel release];
    [_seeButton release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.contentView.backgroundColor = [UIColor whiteColor];
        self.myImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.myImageView];
        [_myImageView release];
        
        self.nickLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.nickLabel];
        self.nickLabel.textAlignment = NSTextAlignmentCenter;
        
        self.nickLabel.font = [UIFont systemFontOfSize:13];
        
        [_nickLabel release];
        self.seeButton = [UIButton buttonWithType:UIButtonTypeCustom];
//        [self.seeButton setTitle:@"+关注" forState:UIControlStateNormal];
//        [self.seeButton setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
//        [self.seeButton setTitleColor:[UIColor cyanColor] forState: UIControlStateHighlighted];
        [self.contentView addSubview:self.seeButton];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.myImageView.frame = CGRectMake(5, 5, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.width - 10);
    self.nickLabel.frame = CGRectMake(5, self.contentView.bounds.size.width - 5, self.contentView.bounds.size.width - 10, 20);
    self.seeButton.frame = CGRectMake(5, self.contentView.bounds.size.width + 15, self.contentView.bounds.size.width - 10, self.contentView.bounds.size.height - self.contentView.bounds.size.width - 15);
}

@end
